// eslint-disable-next-line wpcalypso/i18n-unlocalized-url
const root = 'https://wordpress.com/support';

export const ADDING_GSUITE_TO_YOUR_SITE = `${ root }/add-email/adding-google-workspace-to-your-site/`;
export const ADDING_TITAN_TO_YOUR_SITE = `${ root }/add-email/adding-professional-email-to-your-site/`;
export const AUTO_RENEWAL = `${ root }/support/manage-purchases/automatic-renewal/`;
export const CHANGE_NAME_SERVERS = `${ root }/domains/change-name-servers/`;
export const CHANGE_NAME_SERVERS_FINDING_OUT_NEW_NS = `${ root }/domains/change-name-servers/#step-1-find-your-new-name-servers`;
export const CONCIERGE_SUPPORT = `${ root }/concierge-support/`;
export const CONTACT = `${ root }/contact/`;
export const CALYPSO_CONTACT = '/help/contact';
export const CALYPSO_HELP = '/help';
export const CALYPSO_HELP_WITH_HELP_CENTER = CALYPSO_HELP + '?help-center=home';
export const CUSTOM_DNS = `${ root }/domains/custom-dns/`;
export const DOMAIN_REGISTRATION_AGREEMENTS = `${ root }/domain-registration-agreements/`;
export const DOMAIN_WAITING = `${ root }/domains/register-domain/#waiting-for-domain-changes`;
export const DOMAINS = `${ root }/domains/`;
export const DOMAIN_CANCEL = `${ root }/domains/cancel-refund-a-domain/`;
export const DOMAIN_EXPIRATION = `${ root }/domains/domain-expiration/`;
export const DOMAIN_EXPIRATION_AUCTION = `${ root }/domains/domain-expiration/#expiry-auction`;
export const DOMAIN_EXPIRATION_REDEMPTION = `${ root }/domains/domain-expiration/#renewing-a-domain-in-the-redemption-period`;
export const DOMAIN_RECENTLY_REGISTERED = `${ root }/domains/register-domain/#waiting-for-domain-changes`;
export const DOMAIN_PRICING_AND_AVAILABLE_TLDS = `${ root }/domains/domain-pricing-and-available-tlds/`;
export const DOMAIN_PROMOTIONAL_PRICING_POLICY = `${ root }/domains/domain-pricing-and-available-tlds/#domain-name-promotional-pricing-policy`;
export const DOMAIN_CHANGE_NAME_SERVERS = `${ root }/domains/change-name-servers/#changing-name-servers-to-point-to-word-press-com`;
export const DNS_RECORDS_ADD = `${ root }/domains/custom-dns/add-a-new-dns-record/`;
export const DNS_RECORDS_EDITING_OR_DELETING = `${ root }/domains/custom-dns/edit-or-delete-dns-records/`;
export const DNS_RECORDS_DEFAULT = `${ root }/domains/custom-dns/view-or-restore-default-dns-records/`;
export const DNS_RECORDS_DEFAULT_MX = `${ root }/domains/custom-dns/view-or-restore-default-dns-records/#default-mx-records`;
export const DNS_RECORDS_DEFAULT_CNAME = `${ root }/domains/custom-dns/view-or-restore-default-dns-records/#default-cname-record`;
export const DNS_RECORDS_DEFAULT_A = `${ root }/domains/custom-dns/view-or-restore-default-dns-records/#default-a-records`;
export const ECOMMERCE = `${ root }/ecommerce/`;
export const INCOMING_DOMAIN_TRANSFER_STATUSES = `${ root }/move-domain/incoming-domain-transfer/#checking-your-transfer-status-and-failed-transfers`;
export const INCOMING_DOMAIN_TRANSFER_STATUSES_IN_PROGRESS = `${ root }/incoming-domain-transfer/#step-4-check-the-transfer-status`;
export const INCOMING_DOMAIN_TRANSFER = `${ root }/incoming-domain-transfer/`;
export const INCOMING_DOMAIN_TRANSFER_PREPARE_UNLOCK = `${ root }/incoming-domain-transfer/#step-1-unlock-your-domain`;
export const INCOMING_DOMAIN_TRANSFER_PREPARE_AUTH_CODE = `${ root }/incoming-domain-transfer/#step-2-obtain-your-domain-transfer-authorization-code`;
export const INCOMING_DOMAIN_TRANSFER_AUTH_CODE_INVALID = `${ root }/incoming-domain-transfer/#faq-and-troubleshooting`;
export const INCOMING_DOMAIN_TRANSFER_SUPPORTED_TLDS = `${ root }/incoming-domain-transfer/#which-tl-ds-extensions-can-i-transfer-to-word-press-com`;
export const EDIT_PAYMENT_DETAILS = `${ root }/payment/#edit-payment-details`;
export const EMAIL_FORWARDING = `${ root }/email-forwarding/`;
export const EMAIL_VALIDATION_AND_VERIFICATION = `${ root }/domains/register-domain/#email-validation-and-verification`;
export const EMPTY_SITE = `${ root }/empty-site/`;
export const FORMS = `${ root }/forms/`;
export const GDPR_POLICIES = `${ root }/your-site-and-the-gdpr/`;
export const GSUITE_LEARNING_CENTER = 'https://workspace.google.com/learning-center/';
export const HTTPS_SSL = `${ root }/domains/https-ssl/`;
export const JETPACK_SUPPORT = 'https://jetpack.com/support/';
export const JETPACK_SUPPORT_CONNECTION_ISSUES =
	'https://jetpack.com/support/getting-started-with-jetpack/fixing-jetpack-connection-issues/';
export const JETPACK_CONTACT_SUPPORT = 'https://jetpack.com/contact-support/?rel=support';
export const JETPACK_CONTACT_SUPPORT_NO_ASSISTANT =
	'https://jetpack.com/contact-support/?rel=support&assistant=false';
export const JETPACK_PRICING_PAGE = 'https://jetpack.com/pricing/';
export const JETPACK_SERVICE_VAULTPRESS = 'https://help.vaultpress.com/install-vaultpress/';
export const JETPACK_SERVICE_AKISMET = 'https://akismet.com/support/';
export const MAP_EXISTING_DOMAIN = `${ root }/domains/connect-existing-domain/`;
export const MAP_EXISTING_DOMAIN_UPDATE_DNS = `${ root }/domains/connect-existing-domain/#option-1-update-nbsp-name-nbsp-servers-nbsp-yourself`;
export const MAP_EXISTING_DOMAIN_UPDATE_A_RECORDS = `${ root }/domains/connect-a-domain-alternative-method`;
export const MAP_SUBDOMAIN = `${ root }/domains/connect-subdomain/`;
export const MAP_SUBDOMAIN_WITH_CNAME_RECORDS = `${ root }/domains/connect-subdomain/#adding-cname-records-with-your-registrar`;
export const MAP_DOMAIN_CHANGE_NAME_SERVERS = `${ root }/domains/connect-existing-domain/#step-2-change-your-domains-name-servers`;
export const PREMIUM_DOMAINS = `${ root }/domains/premium-domains/`;
export const PRIVACY_PROTECTION = `${ root }/domains/private-domain-registration/#what-is-privacy-protection`;
export const PUBLIC_VS_PRIVATE = `${ root }/domains/register-domain/#public-versus-private-registration-and-gdpr`;
export const REFUNDS = `${ root }/refunds/`;
export const REGISTER_DOMAIN = `${ root }/domains/register-domain/`;
export const SCHEDULED_UPDATES_SUPPORT = `${ root }/plugins/update-a-plugin-or-theme/#schedule-plugin-updates`;
export const SETTING_PRIMARY_DOMAIN = `${ root }/domains/set-a-primary-address/`;
export const SETTING_UP_PREMIUM_SERVICES = `${ root }/setting-up-premium-services/`;
export const SET_UP_EMAIL_AUTHENTICATION_FOR_YOUR_DOMAIN = `${ root }/set-up-email-authentication-for-your-domain/`;
export const SITE_REDIRECT = `${ root }/site-redirect/`;
export const SUPPORT_ROOT = `${ root }/`;
export const TRANSFER_DOMAIN_REGISTRATION = `${ root }/transfer-domain-registration/`;
export const UPDATE_CONTACT_INFORMATION_EMAIL_OR_NAME_CHANGES = `${ root }/update-contact-information/#email-or-name-changes`;
export const UPDATE_NAMESERVERS = `${ root }/domains/change-name-servers/`;
export const WPCC = `${ root }/wpcc-faq/`;

export const isThisASupportArticleLink = ( href: string ) =>
	/wordpress\.com(\/\w\w)?(?=\/support\/)|support\.wordpress\.com/.test( href );
